import request from '@/utils/request'
import {getToken} from '@/utils/auth'
var token = getToken()
//列表
export function getenterpriseList(data) {
  return request({
    url: '/api/admin/qiye',
    method: 'get',
    params:data
  })
}
//小程序用户列表
export function getprogramList(data) {
    return request({
      url: '/api/admin/qiye/user',
      method: 'get',
      params:data
    })
  }
//小程序用户添加
export function addprogramuser(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/api/admin/qiye/create-user',
    method: 'post',
    data:newData
  })
}
//小程序用户修改
export function editprogramuser(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/api/admin/qiye/edit-user',
    method: 'post',
    data:newData
  })
}
//小程序用户禁用
export function toggleprogramuser(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/api/admin/qiye/del-user',
    method: 'post',
    data:newData
  })
}
//小程序权限
export function userroleprogramuser(data) {
  return request({
    url: '/api/admin/qiye/user-role',
    method: 'get',
    params:data
  })
}
//时间超时
export function editovertime(formData) {
  let newData=JSON.stringify(formData);
  return request({
    url: '/api/admin/overtime-edit',
    method: 'post',
    data:newData
  })
}
//获取时间超时
export function getovertime() {
  return request({
    url: '/api/admin/overtime',
    method: 'get'
  })
}
